<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<select>
    <option>请选择</option>
    <option value="0">河北省</option>
    <option value="1">北京</option>
    <option value="2">山东省</option>
</select>
<select>
    <option>请选择</option>
</select>

<script src="jq.js"></script>
<script>
    let arr=[["石家庄","唐山","秦皇岛"],["朝阳区","海淀区","大兴区"],["青岛市","菏泽","烟台"]];
//    给第一个下拉选添加只改变事件
    $("select:first").change(function () {
        // 用一个请选择 覆盖原有内容
        $("select:last").html("<option>请选择</option>");

        // 通过得到的数组下标  取出arr数组中对应的城市
        let cities=arr[$("select:first").val()];
    //    遍历数组
        for (let i = 0; i < cities.length; i++) {
            let name=cities[i];
            let o=$("<option></option>");
            o.text(name);
            $("select:last").append(o);
        }
    });
</script>
</body>
</html>